package com.seari.service.impl;

import com.seari.bean.DataTable;
import com.seari.bean.DataTableKey;
import com.seari.bean.RedisKey;
import com.seari.mapper.RedisKeyTableMapper;
import com.seari.service.CommonDataService;
import com.seari.mapper.DataTableMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("commonDataService")
public class CommonDataServiceImpl implements CommonDataService{

    @Autowired
    private DataTableMapper dataTableMapper;

    @Autowired
    private RedisKeyTableMapper redisKeyTableMapper;

    @Override
    public List<RedisKey> getRedisKeysByType (String type){
        return redisKeyTableMapper.getRedisKeysByType(type);
    }

    @Override
    public List<DataTable> getDataTableListByKey(String redisKey){
        return dataTableMapper.getDataTableListByKey(redisKey);
    }

    @Override
    public List<DataTableKey> getDataTableKeyList(String key){
        return dataTableMapper.getDataTableKeyList(key);
    }
}
